import fetch from "./request.js";

// 查询
export function pageCreditLoan(data) {
  return fetch("/nb-pc/1.0.1/CreditLoanService/pageCreditLoan", {
    method: "post",
    data: data,
  });
}
// 详情
export function detailCreditLoan(data) {
  return fetch("/nb-pc/1.0.1/CreditLoanService/detailCreditLoan", {
    method: "post",
    data: data,
    headers:{
      "Content-Type":"application/json; charset=utf-8"
    },
    withLoading: true,
  });
}
// 新增
export function addCreditLoan(data) {
  return fetch("/nb-pc/1.0.1/CreditLoanService/addCreditLoan", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 修改
export function updateCreditLoan(data) {
  return fetch("/nb-pc/1.0.1/CreditLoanService/updateCreditLoan", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 发布
export function publishCreditLoan(data) {
  return fetch("/nb-pc/1.0.1/CreditLoanService/publishCreditLoan", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 取消发布
export function unPublishCreditLoan(data) {
  return fetch("/nb-pc/1.0.1/CreditLoanService/unPublishCreditLoan", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 推荐
export function recommendCreditLoan(data) {
  return fetch("/nb-pc/1.0.1/CreditLoanService/recommendCreditLoan", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 取消推荐
export function unRecommendCreditLoanList(data) {
  return fetch("/nb-pc/1.0.1/CreditLoanService/unRecommendCreditLoanList", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 删除
export function deleteCreditLoan(data) {
  return fetch("/nb-pc/1.0.1/CreditLoanService/deleteCreditLoan", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
